package com.example.mydianping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.mydianping.pojo.Voucher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VoucherMapper extends BaseMapper<Voucher> {
    //查询店铺的所有优惠卷
    @Select("select * from tb_voucher where shop_id = #{shopId}")
    List<Voucher> selectVouchers(@Param("shopId") long shopId);
}
